package Creature;



import java.util.ArrayList;

/**
 * @description:
 * @author: 28437
 * @date: Created in 2020/5/31 8:42
 * @version: 1.0
 * @modified By:
 */
public class MonsterSet {
    private ArrayList<Monster> monsters=new ArrayList<Monster>();

    public Monster get(String id){
        Monster monster=null;
        for (Monster i:monsters
        ) {
            if(id.equals(i.getId())){
                monster=i;
                break;
            }
        }
        return monster;
    }



    public MonsterSet() {
   }

    public ArrayList<Monster> getMonsters() {
        return monsters;
    }

    public void setMonsters(ArrayList<Monster> monsters) {
        this.monsters = monsters;
    }

    public MonsterSet(ArrayList<Monster> monsters) {
      this.monsters = monsters;
   }

}
